From: M A Young Date: Thu, 18 Dec 2014 10:02:16 +0000 (+0000) Subject: tools/xl: fix segfault in xl migrate --debug X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4006 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=36174af3fbeb1b662c0eadbfa193e77f68cc955b;p=xen.git tools/xl: fix segfault in xl migrate --debug If differences are found during the verification phase of xl migrate --debug then it is likely to crash with a segfault because the bogus pagebuf->pfn_types[pfn] is used in a print statement instead of pfn_type[pfn] . Signed-off-by: Michael Young Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index d8bd9b3857..a382701bbb 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -1404,7 +1404,7 @@ static int apply_batch(xc_interface *xch, uint32_t dom, struct restore_ctx *ctx, int v; DPRINTF("************** pfn=%lx type=%lx gotcs=%08lx " - "actualcs=%08lx\n", pfn, pagebuf->pfn_types[pfn], + "actualcs=%08lx\n", pfn, pfn_type[pfn], csum_page(region_base + i * PAGE_SIZE), csum_page(buf));